package com.gxa.weixing.core.pojo;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author 18380
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
@Table(name = "tb_for_goods_details")
public class ForGoodsDetails {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "for_goods_details_id")
    @ApiModelProperty(name = "forGoodsDetailsId", value = "兑换商品详情id", dataType = "Long", example = "1")
    private Long forGoodsDetailsId;

    @Column(name = "for_goods_id")
    @ApiModelProperty(name = "forGoodsId", value = "兑换商品的id", dataType = "Long", example = "1")
    private Long forGoodsId;

    @Column(name = "goods_referral")
    @ApiModelProperty(name = "goodsReferral", value = "商品详情介绍", dataType = "String", example = "这是商品的详细介绍")
    private String goodsReferral;

    @Column(name = "for_start_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(name = "forStartTime", value = "开始兑换时间", dataType = "Date", example = "2020-12-01")
    private Date forStartTime;

    @Column(name = "for_end_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(name = "forEndTime", value = "兑换结束时间", dataType = "Date", example = "2020-12-10")
    private Date forEndTime;

    @Column(name = "used_end_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(name = "usedEndTime", value = "券使用截止时间", dataType = "Date", example = "2020-12-10")
    private Date usedEndTime;

    @Column(name = "example_img")
    @ApiModelProperty(name = "exampleImg", value = "示例图", dataType = "String", example = "/apple.jpg")
    private String exampleImg;

    @Column(name = "supplier_id")
    @ApiModelProperty(name = "supplierId", value = "供应商编号", dataType = "Long", example = "1")
    private Long supplierId;

    @Column(name = "for_goods_total")
    @ApiModelProperty(name = "forGoodsTotal", value = "兑换数量", dataType = "Long", example = "100")
    private Long forGoodsTotal;

    @Column(name = "fake_amount")
    @ApiModelProperty(name = "fakeAmount", value = "虚拟兑换量", dataType = "Long", example = "100")
    private Long fakeAmount;

    @Column(name = "tater")
    @ApiModelProperty(name = "tater", value = "状态 ", dataType = "Boolean", example = "true/false")
    private Boolean tater;

    @Column(name = "before_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(name = "beforeTime", value = "添加时间 ", dataType = "Date", example = "2020-12-12")
    private Date beforeTime;

    @Column(name = "selling_price")
    @ApiModelProperty(name = "sellingPrice", value = "卖价 ", dataType = "BigDecimal", example = "9.99")
    private BigDecimal sellingPrice;

    @Column(name = "fake_price")
    @ApiModelProperty(name = "fakePrice", value = "虚拟价格 ", dataType = "BigDecimal", example = "9.99")
    private BigDecimal fakePrice;

    @Column(name = "is_write_off")
    @ApiModelProperty(name = "isWriteOff", value = "是否需要核销 ", dataType = "Boolean", example = "true/false")
    private Boolean isWriteOff;

    @Column(name = "for_goods_Inventory")
    @ApiModelProperty(name = "forGoodsInventory", value = "库存 ", dataType = "Integer", example = "100")
    private Integer forGoodsInventory;

    @Column(name = "purchase_price")
    @ApiModelProperty(name = "purchasePrice", value = "采购价格 ", dataType = "BigDecimal", example = "100.99")
    private BigDecimal purchasePrice;

    //对应的商品简单信息
    private ForGoods forGoods;

}
